package com.controller;

import com.model.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

@Controller
public class inController {
    @RequestMapping(value = {"","/login"})
    public String login(Model model){
        List<User> users = new ArrayList<>();
        for (int i = 0; i<8;  i++){
            User user = new User();
            user.setUId(i);
            user.setUName("2"+i);
            users.add(user);
        }
        model.addAttribute("user",users);
        return "login";
    }
}
